package com.my.study;

import com.my.study.util.RedisUtil;
import org.redisson.api.RedissonClient;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;

/**
 * redis启动类
 *
 * @author: yidujun
 * @create: 2021/03/15 13:40
 */
@SpringBootApplication
public class RedisApplication {

    public static void main(String[] args) {
        ConfigurableApplicationContext cxt = SpringApplication.run(RedisApplication.class, args);

        RedisUtil redisUtil = cxt.getBean(RedisUtil.class);

        redisUtil.set("user:1", "12344");

        RedissonClient redissonClient = cxt.getBean(RedissonClient.class);


        System.out.println("");
    }

}
